package using;

import using.association.association_login;
import using.student.student_login;
import using.supers.super_login;
import javax.swing.*;
import java.awt.*;
import java.net.URL;

public class chushi_frame extends JFrame {
    public chushi_frame() {
        setTitle("Initial interface");
        setBounds(200, 200, 700, 495);
        Container container = getContentPane();
        JPanel panel1 = new JPanel();
        panel1.setBorder(BorderFactory.createTitledBorder("Function panel"));
        panel1.setLayout(null);
        JButton jb1 = new JButton("association_login");
        JButton jb2 = new JButton("student_login");
        JButton jb3 = new JButton("super_login");
        JLabel jk1 = new JLabel("welcome to System of student's association");
        jk1.setForeground(Color.white);
        panel1.add(jk1);
        jk1.setBounds(400, 100, 250, 200);
        JLabel jl1 = new JLabel();
        URL url = chushi_frame.class.getResource("use1.png");
        Icon icon = new ImageIcon(url);
        jl1.setIcon(icon);
        jl1.setHorizontalAlignment(SwingConstants.CENTER);
        jl1.setOpaque(true);
        jl1.setBounds(0, 0, 700, 495);
        jb1.setBounds(100, 100, 200, 50);
        jb2.setBounds(100, 200, 200, 50);
        jb3.setBounds(100, 300, 200, 50);
        jb1.addActionListener(e -> new association_login());
        jb2.addActionListener(e -> new student_login());
        jb3.addActionListener(e -> new super_login());
        container.add(panel1);
        panel1.add(jb1);panel1.add(jb2);panel1.add(jb3);panel1.add(jl1);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setVisible(true); }
    public static void tan() {
        chushi_frame manageMainFrame =new chushi_frame();
        manageMainFrame.setVisible(true); }
    public static void main(String[] args)
    {
        new chushi_frame();
    }
}
